﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JBeamLibrary.VehicleParts.Interfaces;

namespace JBeamLibrary.Tools
{
    public static class Utils
    {
        public static string GetNewId(int count)
        {
            return string.Format("{0}_new{1}", Randomizer.GetRandomName(), count);
        }

        public static string GetNewId(string prefix, IEnumerable<INumeric> list)
        {
            return string.Format("{0}{1}", prefix, (list.Any() ? list.Max(num => num.NumericId + 1) : 1));
        }
    }
}
